package com.dabai.qrtools.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.cardview.widget.CardView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.qrtools.R;
import com.dabai.qrtools.bean.QrInfo;
import com.dabai.qrtools.other.ImageUtils;

import java.util.ArrayList;

/**
 * Description : Other
 *
 * @author BAI
 */
public class QrListAdapter extends BaseQuickAdapter<QrInfo, BaseViewHolder> {

    public QrListAdapter(ArrayList<QrInfo> qrInfos) {
        super(R.layout.item_qr, qrInfos);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, QrInfo qrInfo) {
        baseViewHolder.setImageBitmap(R.id.img, qrInfo.getQr());
        baseViewHolder.setText(R.id.textView1, qrInfo.getContent());
    }


}
